<style>
    .exception{position: fixed;top: 20px;right: 300px;color: #fff;}
</style>
<div class="layui-header" style="z-index:999!important;">
<style>
    .test{font-size: 40px;
    position: fixed;
    top: 2px;
    right: 400px;}
    .exception{position: fixed;top: 20px;right: 300px;color: #fff;}
</style>
<div class="layui-header" style="z-index:999!important;">  
    <div class="fl header-logo">{:env('env')=='test'?'<span style="color:red;">【测试】后台</span>' : config('base.site_title') }</div>
    <div class="fl header-fold"><a href="javascript:;" title="打开/关闭左侧导航" class="aicon ai-shouqicaidan" id="foldSwitch"></a></div>
    <ul class="layui-nav fl nobg main-nav">
        {volist name="hisiMenus" id="vo"}
            {if condition="($hisiCurParents['pid'] eq $vo['id'] and $ca neq 'plugins/run') or ($ca eq 'plugins/run' and $vo['id'] eq 3)"}
           <li class="layui-nav-item layui-this">
            {else /}
            <li class="layui-nav-item">
            {/if} 
            <a href="javascript:;">{$vo['title']}</a></li>
        {/volist}
    </ul>

    <ul class="layui-nav fr nobg head-info">
        <li class="layui-nav-item">
            <button class="layui-btn layui-btn-radius layui-btn-checked layui-btn-xs" id="pv_uv_str" onclick="show_uv_list()"></button>
        </li>
    	<li class="layui-nav-item">
    	{if checkAuthByURI('mp/OrderException/start_up') == true}
	    <button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">损耗情况 {$exceptionNum}</button>
	    {/if}
    	</li>
    
    	{if checkAuthByURI('mp/dailyV2/index') == true}
        <li class="layui-nav-item">
            <a href="{:url('mp/dailyV2/index')}" target="_blank" class="aicon ai-mokuaiguanli1" title="日报"></a>
        </li>
        {/if}
        
        {if checkAuthByURI('system/index/clear')}
        <li class="layui-nav-item">
            <a href="javascript:void(0);" class="aicon ai-qingchu" id="hisi-clear-cache" title="清缓存"></a>
        </li>
        {/if}
        
        <li class="layui-nav-item">
            <a href="javascript:void(0);" class="aicon ai-suo" id="lockScreen" title="锁屏"></a>
        </li>
        
        {if checkAuthByURI('system/user/setTheme')}
        <li class="layui-nav-item">
            <a href="{:url('system/user/setTheme')}" id="hisi-theme-setting" class="aicon ai-theme"></a>
        </li>
        {/if}
        
        <li class="layui-nav-item">
            <a href="javascript:void(0)" id="fullscreen-btn" class="aicon ai-quanping1" title="全屏"></a>
        </li>
        
        {if checkAuthByURI('system/language/index')}
        <li class="layui-nav-item hisi-lang">
            <a href="javascript:void(0);"><i class="layui-icon layui-icon-website"></i></a>
            <dl class="layui-nav-child">
                {volist name="languages" id="vo"}
                    {if condition="$vo['pack']"}
                    <dd><a href="{:url('system/index/index')}?lang={$vo['code']}">{$vo['name']}</a></dd>
                    {/if}
                {/volist}
                <dd>
                    <a data-id="000" class="admin-nav-item top-nav-item" href="{:url('system/language/index')}">语言包管理</a>
                </dd>
            </dl>
        </li>
        {/if}
        
        <li class="layui-nav-item">
            <a href="javascript:void(0);">{$login['nick']}&nbsp;&nbsp;</a>
            <dl class="layui-nav-child">
                {if checkAuthByURI('system/user/info')}
                <dd>
                    <a data-id="00" class="admin-nav-item top-nav-item" href="{:url('system/user/info')}">个人设置</a>
                </dd>
                {/if}
                
                {if checkAuthByURI('system/user/iframe')}
                <dd>
                    <a href="{:url('system/user/iframe')}" class="hisi-ajax" refresh="true">{:input('cookie.hisi_iframe') ? '单页布局' : '框架布局' }</a>
                </dd>
                {/if}
                
                <dd>
                    <a href="{:url('system/publics/logout')}">退出登陆</a>
                </dd>
            </dl>
        </li>
    </ul>
    
    <!-- 系统弹窗消息跳转设置 -->
    <a href="#" data-id="11110" id="system-msg-page" class="admin-nav-item hide"></a>
    
</div>
<div class="layui-side layui-bg-black" id="switchNav">
    <div class="layui-side-scroll">
        {volist name="hisiMenus" id="v"}
        {if condition="($hisiCurParents['pid'] eq $v['id'] and $ca neq 'plugins/run') or ($ca eq 'plugins/run' and $v['id'] eq 3)"}
        <ul class="layui-nav layui-nav-tree">
        {else /}
        <ul class="layui-nav layui-nav-tree" style="display:none;">
        {/if}
        {if (isset($v['childs']))}
            {volist name="v['childs']" id="vv" key="kk"}
            <li class="layui-nav-item {if condition="$kk eq 1"}layui-nav-itemed{/if}">
                <a href="javascript:;"><i class="{$vv['icon']}"></i>{$vv['title']}<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    {if condition="$vv['title'] eq '快捷菜单'"}
                        <dd>
                            <a class="admin-nav-item" data-id="0" href="{:input('cookie.hisi_iframe') ? url('system/index/welcome') : url('system/index/index')}"><i class="aicon ai-shouye"></i> 后台首页</a>
                        </dd>
                        <dd>
                            <a class="admin-nav-item" data-id="1122" href="{:url('system/index/notice')}"><i class="aicon ai-shouye"></i> 公司公告</a>
                        </dd>
                        {if (isset($vv['childs']))}
                        {volist name="vv['childs']" id="vvv"}
                        <dd>
                            <a class="admin-nav-item" data-id="{$vvv['ori_id']}" href="{if condition="strpos('http', $vvv['url']) heq false"}{:url($vvv['url'], $vvv['param'])}{else /}{$vvv['url']}{/if}">{if condition="file_exists('.'.$vvv['icon'])"}<img src="{$vvv['icon']}" width="16" height="16" />{else /}<i class="{$vvv['icon']}"></i>{/if} {$vvv['title']}</a><i data-href="{:url('system/menu/quick?id='.$vvv['id'])}" class="layui-icon j-del-menu">&#xe640;</i>
                        </dd>
                        {/volist}
                        {/if}
                    {else /}
                        {if (isset($vv['childs']))}
                        {volist name="vv['childs']" id="vvv"}
                        <dd>
                            <a class="admin-nav-item" data-id="{$vvv['id']}" href="{if condition="strpos('http', $vvv['url']) heq false"}{:url($vvv['url'], $vvv['param'])}{else /}{$vvv['url']}{/if}">{if condition="file_exists('.'.$vvv['icon'])"}<img src="{$vvv['icon']}" width="16" height="16" />{else /}<i class="{$vvv['icon']}"></i>{/if} {$vvv['title']}</a>
                        </dd>
                        {/volist}
                        {/if}
                    {/if}
                </dl>
            </li>
            {/volist}
        {/if}
        </ul>
        {/volist}
    </div>
</div>
<script type="text/html" id="hisi-theme-tpl">
    <ul class="hisi-themes">
        {volist name=":session('hisi_admin_themes')" id="vo"}
        <li data-theme="{$vo}" class="hisi-theme-item-{$vo}"></li>
        {/volist}
    </ul>
</script>
<script type="text/html" id="hisi-clear-cache-tpl">
    <form class="layui-form" style="padding:10px 0 0 30px;" action="{:url('system/index/clear')}" method="post">
        <div class="layui-form-item">
            <input type="checkbox" name="cache" value="1" title="数据缓存" />
        </div>
        <div class="layui-form-item">
            <input type="checkbox" name="temp" value="1" title="模板缓存" />
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit">执行删除</button>
        </div>
    </form>
</script>
    <script type="text/html" id="pv_uv_strtpl">
        <table class="layui-table small-table">
            <tbody>
            <tr class="top">
                <td>用户名</td>
                <td>PV值</td>
            </tr>
            {{#  layui.each(d, function(kkk, vvv){ }}
            <tr class="foot">
                <td></td>
                <td></td>
            </tr>
            {{#  }); }}
            </tbody>
        </table>
    </script>

<script>
    var pv_uv_data;
    var show_uv_list_tips;
    //动态显示pv
    function pv_uv_str(hisiTabCurrentId=0,url_sort='') {
        /*//记录 pv uv ip信息
        layui.jquery.ajax({
            type: "POST",
            url: "{:url('mp/Pvuvip/get')}",
            data: {'id':hisiTabCurrentId,'url_sort':url_sort},
            dataType: "json",
            success: function (res) {
                layui.jquery('#pv_uv_str').html("PV:"+res.data.pv+",UV:"+res.data.uv+"");
                pv_uv_data=res;
                layui.jquery("#pv_uv_str").data("show",0);
            }
        });*/
    }
    // 动态显示pv 将函数放入窗口--方便 Layui子窗口调用父窗口use中的函数
    window.pv_uv_str_ext= function(hisiTabCurrentId=0,url_sort=''){
       // pv_uv_str(hisiTabCurrentId,url_sort);
    };
    //动态显示pv详情
    function show_uv_list() {
        if(layui.jquery("#pv_uv_str").data("show")==1){
            layui.layer.close(show_uv_list_tips);
            layui.jquery("#pv_uv_str").data("show",0);
            return true;
        }
        layui.jquery("#pv_uv_str").data("show",1);
        var table =pv_uv_data.data.content;
        show_uv_list_tips=layer.tips(table,"#pv_uv_str",{tips:[3, '#fff'],area: ['auto', 'auto'],time:10000000});
    }
</script>